import { IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';
import P03 from './P03';
import nodejs from '@feidao/web/atom/nodejs/msg-b/nodejs';
import server_render from '../atom/server-render';

import nba002 from './nba002';

export default async function (fd: IFeidaoAiNodejsComponent, ...args: any[]) {

	const res = await nodejs('flippedclass', 'exam_find_default_first', {});
	console.warn('............... exam_find .....................', res);

	if (res.length === 0) {
		server_render(fd.data.node, 'P03', P03, { exam_name: '没有考试数据' });
	} else {
		if (res[0].default_val !== '是') {
			server_render(fd.data.node, 'P03', P03, { exam_name: '没有默认的考试' });
		} else {
			// nba002(fd, res[0].campus_id);
			nba002(fd);
		}
		server_render(fd.data.node, 'P03', P03, res[0]);

	}
	const items = document.querySelectorAll<HTMLInputElement>('[data-feidao-checkbox]');

}
